import Views from "../../views/index.vue";
import type { RouteLocationNormalized, NavigationGuardNext } from "vue-router";

const route = [
    {
        path: "/pinia",
        name: "pinia",
        component: Views,
        redirect: "/pinia/pinia",
        meta: { title: "pinia", icon: "el-icon-table-lamp" },
        children: [
            {
                path: "pinia",
                name: "pinia-pinia",
                component: () => import("../../pages/pinia/index.vue"),
                meta: { title: "pinia" },
                beforeEnter: (to: RouteLocationNormalized, from: RouteLocationNormalized, next: NavigationGuardNext) => {
                    console.log("beforeEnter pinia page", { to, from });
                    next();
                },
            },
        ],
    },
];

export default route;
